/**
 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.innominds.portlets.service.model.impl;

import com.innominds.portlets.service.model.NapierUser;
import com.innominds.portlets.service.model.NapierUserModel;
import com.innominds.portlets.service.model.NapierUserSoap;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.json.JSON;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.ProxyUtil;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.CacheModel;
import com.liferay.portal.model.impl.BaseModelImpl;
import com.liferay.portal.service.ServiceContext;

import com.liferay.portlet.expando.model.ExpandoBridge;
import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;

import java.io.Serializable;

import java.sql.Types;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * The base model implementation for the NapierUser service. Represents a row in the &quot;NH_NapierUser&quot; database table, with each column mapped to a property of this class.
 *
 * <p>
 * This implementation and its corresponding interface {@link com.innominds.portlets.service.model.NapierUserModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link NapierUserImpl}.
 * </p>
 *
 * @author Brian Wing Shun Chan
 * @see NapierUserImpl
 * @see com.innominds.portlets.service.model.NapierUser
 * @see com.innominds.portlets.service.model.NapierUserModel
 * @generated
 */
@JSON(strict = true)
public class NapierUserModelImpl extends BaseModelImpl<NapierUser>
	implements NapierUserModel {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify or reference this class directly. All methods that expect a napier user model instance should use the {@link com.innominds.portlets.service.model.NapierUser} interface instead.
	 */
	public static final String TABLE_NAME = "NH_NapierUser";
	public static final Object[][] TABLE_COLUMNS = {
			{ "uuid_", Types.VARCHAR },
			{ "id_", Types.BIGINT },
			{ "liferayUserId", Types.VARCHAR },
			{ "userType", Types.VARCHAR },
			{ "mrNumber", Types.VARCHAR },
			{ "tpaId", Types.VARCHAR },
			{ "coroporateId", Types.VARCHAR },
			{ "patientId", Types.VARCHAR },
			{ "age", Types.INTEGER },
			{ "mobile", Types.VARCHAR },
			{ "gender", Types.VARCHAR },
			{ "address", Types.VARCHAR },
			{ "specialization", Types.VARCHAR },
			{ "firstname", Types.VARCHAR },
			{ "lastname", Types.VARCHAR },
			{ "username", Types.VARCHAR },
			{ "password_", Types.VARCHAR },
			{ "email", Types.VARCHAR }
		};
	public static final String TABLE_SQL_CREATE = "create table NH_NapierUser (uuid_ VARCHAR(75) null,id_ LONG not null primary key,liferayUserId VARCHAR(75) null,userType VARCHAR(75) null,mrNumber VARCHAR(75) null,tpaId VARCHAR(75) null,coroporateId VARCHAR(75) null,patientId VARCHAR(75) null,age INTEGER,mobile VARCHAR(75) null,gender VARCHAR(75) null,address VARCHAR(75) null,specialization VARCHAR(75) null,firstname VARCHAR(75) null,lastname VARCHAR(75) null,username VARCHAR(75) null,password_ VARCHAR(75) null,email VARCHAR(75) null)";
	public static final String TABLE_SQL_DROP = "drop table NH_NapierUser";
	public static final String ORDER_BY_JPQL = " ORDER BY napierUser.mrNumber ASC";
	public static final String ORDER_BY_SQL = " ORDER BY NH_NapierUser.mrNumber ASC";
	public static final String DATA_SOURCE = "liferayDataSource";
	public static final String SESSION_FACTORY = "liferaySessionFactory";
	public static final String TX_MANAGER = "liferayTransactionManager";
	public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
				"value.object.entity.cache.enabled.com.innominds.portlets.service.model.NapierUser"),
			true);
	public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
				"value.object.finder.cache.enabled.com.innominds.portlets.service.model.NapierUser"),
			true);
	public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
				"value.object.column.bitmask.enabled.com.innominds.portlets.service.model.NapierUser"),
			true);
	public static long LIFERAYUSERID_COLUMN_BITMASK = 1L;
	public static long MRNUMBER_COLUMN_BITMASK = 2L;
	public static long PASSWORD_COLUMN_BITMASK = 4L;
	public static long PATIENTID_COLUMN_BITMASK = 8L;
	public static long TPAID_COLUMN_BITMASK = 16L;
	public static long USERNAME_COLUMN_BITMASK = 32L;
	public static long UUID_COLUMN_BITMASK = 64L;

	/**
	 * Converts the soap model instance into a normal model instance.
	 *
	 * @param soapModel the soap model instance to convert
	 * @return the normal model instance
	 */
	public static NapierUser toModel(NapierUserSoap soapModel) {
		if (soapModel == null) {
			return null;
		}

		NapierUser model = new NapierUserImpl();

		model.setUuid(soapModel.getUuid());
		model.setId(soapModel.getId());
		model.setLiferayUserId(soapModel.getLiferayUserId());
		model.setUserType(soapModel.getUserType());
		model.setMrNumber(soapModel.getMrNumber());
		model.setTpaId(soapModel.getTpaId());
		model.setCoroporateId(soapModel.getCoroporateId());
		model.setPatientId(soapModel.getPatientId());
		model.setAge(soapModel.getAge());
		model.setMobile(soapModel.getMobile());
		model.setGender(soapModel.getGender());
		model.setAddress(soapModel.getAddress());
		model.setSpecialization(soapModel.getSpecialization());
		model.setFirstname(soapModel.getFirstname());
		model.setLastname(soapModel.getLastname());
		model.setUsername(soapModel.getUsername());
		model.setPassword(soapModel.getPassword());
		model.setEmail(soapModel.getEmail());

		return model;
	}

	/**
	 * Converts the soap model instances into normal model instances.
	 *
	 * @param soapModels the soap model instances to convert
	 * @return the normal model instances
	 */
	public static List<NapierUser> toModels(NapierUserSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<NapierUser> models = new ArrayList<NapierUser>(soapModels.length);

		for (NapierUserSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}

	public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
				"lock.expiration.time.com.innominds.portlets.service.model.NapierUser"));

	public NapierUserModelImpl() {
	}

	@Override
	public long getPrimaryKey() {
		return _id;
	}

	@Override
	public void setPrimaryKey(long primaryKey) {
		setId(primaryKey);
	}

	@Override
	public Serializable getPrimaryKeyObj() {
		return _id;
	}

	@Override
	public void setPrimaryKeyObj(Serializable primaryKeyObj) {
		setPrimaryKey(((Long)primaryKeyObj).longValue());
	}

	@Override
	public Class<?> getModelClass() {
		return NapierUser.class;
	}

	@Override
	public String getModelClassName() {
		return NapierUser.class.getName();
	}

	@Override
	public Map<String, Object> getModelAttributes() {
		Map<String, Object> attributes = new HashMap<String, Object>();

		attributes.put("uuid", getUuid());
		attributes.put("id", getId());
		attributes.put("liferayUserId", getLiferayUserId());
		attributes.put("userType", getUserType());
		attributes.put("mrNumber", getMrNumber());
		attributes.put("tpaId", getTpaId());
		attributes.put("coroporateId", getCoroporateId());
		attributes.put("patientId", getPatientId());
		attributes.put("age", getAge());
		attributes.put("mobile", getMobile());
		attributes.put("gender", getGender());
		attributes.put("address", getAddress());
		attributes.put("specialization", getSpecialization());
		attributes.put("firstname", getFirstname());
		attributes.put("lastname", getLastname());
		attributes.put("username", getUsername());
		attributes.put("password", getPassword());
		attributes.put("email", getEmail());

		return attributes;
	}

	@Override
	public void setModelAttributes(Map<String, Object> attributes) {
		String uuid = (String)attributes.get("uuid");

		if (uuid != null) {
			setUuid(uuid);
		}

		Long id = (Long)attributes.get("id");

		if (id != null) {
			setId(id);
		}

		String liferayUserId = (String)attributes.get("liferayUserId");

		if (liferayUserId != null) {
			setLiferayUserId(liferayUserId);
		}

		String userType = (String)attributes.get("userType");

		if (userType != null) {
			setUserType(userType);
		}

		String mrNumber = (String)attributes.get("mrNumber");

		if (mrNumber != null) {
			setMrNumber(mrNumber);
		}

		String tpaId = (String)attributes.get("tpaId");

		if (tpaId != null) {
			setTpaId(tpaId);
		}

		String coroporateId = (String)attributes.get("coroporateId");

		if (coroporateId != null) {
			setCoroporateId(coroporateId);
		}

		String patientId = (String)attributes.get("patientId");

		if (patientId != null) {
			setPatientId(patientId);
		}

		Integer age = (Integer)attributes.get("age");

		if (age != null) {
			setAge(age);
		}

		String mobile = (String)attributes.get("mobile");

		if (mobile != null) {
			setMobile(mobile);
		}

		String gender = (String)attributes.get("gender");

		if (gender != null) {
			setGender(gender);
		}

		String address = (String)attributes.get("address");

		if (address != null) {
			setAddress(address);
		}

		String specialization = (String)attributes.get("specialization");

		if (specialization != null) {
			setSpecialization(specialization);
		}

		String firstname = (String)attributes.get("firstname");

		if (firstname != null) {
			setFirstname(firstname);
		}

		String lastname = (String)attributes.get("lastname");

		if (lastname != null) {
			setLastname(lastname);
		}

		String username = (String)attributes.get("username");

		if (username != null) {
			setUsername(username);
		}

		String password = (String)attributes.get("password");

		if (password != null) {
			setPassword(password);
		}

		String email = (String)attributes.get("email");

		if (email != null) {
			setEmail(email);
		}
	}

	@JSON
	@Override
	public String getUuid() {
		if (_uuid == null) {
			return StringPool.BLANK;
		}
		else {
			return _uuid;
		}
	}

	@Override
	public void setUuid(String uuid) {
		if (_originalUuid == null) {
			_originalUuid = _uuid;
		}

		_uuid = uuid;
	}

	public String getOriginalUuid() {
		return GetterUtil.getString(_originalUuid);
	}

	@JSON
	@Override
	public long getId() {
		return _id;
	}

	@Override
	public void setId(long id) {
		_id = id;
	}

	@JSON
	@Override
	public String getLiferayUserId() {
		if (_liferayUserId == null) {
			return StringPool.BLANK;
		}
		else {
			return _liferayUserId;
		}
	}

	@Override
	public void setLiferayUserId(String liferayUserId) {
		_columnBitmask |= LIFERAYUSERID_COLUMN_BITMASK;

		if (_originalLiferayUserId == null) {
			_originalLiferayUserId = _liferayUserId;
		}

		_liferayUserId = liferayUserId;
	}

	public String getOriginalLiferayUserId() {
		return GetterUtil.getString(_originalLiferayUserId);
	}

	@JSON
	@Override
	public String getUserType() {
		if (_userType == null) {
			return StringPool.BLANK;
		}
		else {
			return _userType;
		}
	}

	@Override
	public void setUserType(String userType) {
		_userType = userType;
	}

	@JSON
	@Override
	public String getMrNumber() {
		if (_mrNumber == null) {
			return StringPool.BLANK;
		}
		else {
			return _mrNumber;
		}
	}

	@Override
	public void setMrNumber(String mrNumber) {
		_columnBitmask = -1L;

		if (_originalMrNumber == null) {
			_originalMrNumber = _mrNumber;
		}

		_mrNumber = mrNumber;
	}

	public String getOriginalMrNumber() {
		return GetterUtil.getString(_originalMrNumber);
	}

	@JSON
	@Override
	public String getTpaId() {
		if (_tpaId == null) {
			return StringPool.BLANK;
		}
		else {
			return _tpaId;
		}
	}

	@Override
	public void setTpaId(String tpaId) {
		_columnBitmask |= TPAID_COLUMN_BITMASK;

		if (_originalTpaId == null) {
			_originalTpaId = _tpaId;
		}

		_tpaId = tpaId;
	}

	public String getOriginalTpaId() {
		return GetterUtil.getString(_originalTpaId);
	}

	@JSON
	@Override
	public String getCoroporateId() {
		if (_coroporateId == null) {
			return StringPool.BLANK;
		}
		else {
			return _coroporateId;
		}
	}

	@Override
	public void setCoroporateId(String coroporateId) {
		_coroporateId = coroporateId;
	}

	@JSON
	@Override
	public String getPatientId() {
		if (_patientId == null) {
			return StringPool.BLANK;
		}
		else {
			return _patientId;
		}
	}

	@Override
	public void setPatientId(String patientId) {
		_columnBitmask |= PATIENTID_COLUMN_BITMASK;

		if (_originalPatientId == null) {
			_originalPatientId = _patientId;
		}

		_patientId = patientId;
	}

	public String getOriginalPatientId() {
		return GetterUtil.getString(_originalPatientId);
	}

	@JSON
	@Override
	public int getAge() {
		return _age;
	}

	@Override
	public void setAge(int age) {
		_age = age;
	}

	@JSON
	@Override
	public String getMobile() {
		if (_mobile == null) {
			return StringPool.BLANK;
		}
		else {
			return _mobile;
		}
	}

	@Override
	public void setMobile(String mobile) {
		_mobile = mobile;
	}

	@JSON
	@Override
	public String getGender() {
		if (_gender == null) {
			return StringPool.BLANK;
		}
		else {
			return _gender;
		}
	}

	@Override
	public void setGender(String gender) {
		_gender = gender;
	}

	@JSON
	@Override
	public String getAddress() {
		if (_address == null) {
			return StringPool.BLANK;
		}
		else {
			return _address;
		}
	}

	@Override
	public void setAddress(String address) {
		_address = address;
	}

	@JSON
	@Override
	public String getSpecialization() {
		if (_specialization == null) {
			return StringPool.BLANK;
		}
		else {
			return _specialization;
		}
	}

	@Override
	public void setSpecialization(String specialization) {
		_specialization = specialization;
	}

	@JSON
	@Override
	public String getFirstname() {
		if (_firstname == null) {
			return StringPool.BLANK;
		}
		else {
			return _firstname;
		}
	}

	@Override
	public void setFirstname(String firstname) {
		_firstname = firstname;
	}

	@JSON
	@Override
	public String getLastname() {
		if (_lastname == null) {
			return StringPool.BLANK;
		}
		else {
			return _lastname;
		}
	}

	@Override
	public void setLastname(String lastname) {
		_lastname = lastname;
	}

	@JSON
	@Override
	public String getUsername() {
		if (_username == null) {
			return StringPool.BLANK;
		}
		else {
			return _username;
		}
	}

	@Override
	public void setUsername(String username) {
		_columnBitmask |= USERNAME_COLUMN_BITMASK;

		if (_originalUsername == null) {
			_originalUsername = _username;
		}

		_username = username;
	}

	public String getOriginalUsername() {
		return GetterUtil.getString(_originalUsername);
	}

	@JSON
	@Override
	public String getPassword() {
		if (_password == null) {
			return StringPool.BLANK;
		}
		else {
			return _password;
		}
	}

	@Override
	public void setPassword(String password) {
		_columnBitmask |= PASSWORD_COLUMN_BITMASK;

		if (_originalPassword == null) {
			_originalPassword = _password;
		}

		_password = password;
	}

	public String getOriginalPassword() {
		return GetterUtil.getString(_originalPassword);
	}

	@JSON
	@Override
	public String getEmail() {
		if (_email == null) {
			return StringPool.BLANK;
		}
		else {
			return _email;
		}
	}

	@Override
	public void setEmail(String email) {
		_email = email;
	}

	public long getColumnBitmask() {
		return _columnBitmask;
	}

	@Override
	public ExpandoBridge getExpandoBridge() {
		return ExpandoBridgeFactoryUtil.getExpandoBridge(0,
			NapierUser.class.getName(), getPrimaryKey());
	}

	@Override
	public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
		ExpandoBridge expandoBridge = getExpandoBridge();

		expandoBridge.setAttributes(serviceContext);
	}

	@Override
	public NapierUser toEscapedModel() {
		if (_escapedModel == null) {
			_escapedModel = (NapierUser)ProxyUtil.newProxyInstance(_classLoader,
					_escapedModelInterfaces, new AutoEscapeBeanHandler(this));
		}

		return _escapedModel;
	}

	@Override
	public Object clone() {
		NapierUserImpl napierUserImpl = new NapierUserImpl();

		napierUserImpl.setUuid(getUuid());
		napierUserImpl.setId(getId());
		napierUserImpl.setLiferayUserId(getLiferayUserId());
		napierUserImpl.setUserType(getUserType());
		napierUserImpl.setMrNumber(getMrNumber());
		napierUserImpl.setTpaId(getTpaId());
		napierUserImpl.setCoroporateId(getCoroporateId());
		napierUserImpl.setPatientId(getPatientId());
		napierUserImpl.setAge(getAge());
		napierUserImpl.setMobile(getMobile());
		napierUserImpl.setGender(getGender());
		napierUserImpl.setAddress(getAddress());
		napierUserImpl.setSpecialization(getSpecialization());
		napierUserImpl.setFirstname(getFirstname());
		napierUserImpl.setLastname(getLastname());
		napierUserImpl.setUsername(getUsername());
		napierUserImpl.setPassword(getPassword());
		napierUserImpl.setEmail(getEmail());

		napierUserImpl.resetOriginalValues();

		return napierUserImpl;
	}

	@Override
	public int compareTo(NapierUser napierUser) {
		int value = 0;

		value = getMrNumber().compareTo(napierUser.getMrNumber());

		if (value != 0) {
			return value;
		}

		return 0;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}

		if (!(obj instanceof NapierUser)) {
			return false;
		}

		NapierUser napierUser = (NapierUser)obj;

		long primaryKey = napierUser.getPrimaryKey();

		if (getPrimaryKey() == primaryKey) {
			return true;
		}
		else {
			return false;
		}
	}

	@Override
	public int hashCode() {
		return (int)getPrimaryKey();
	}

	@Override
	public void resetOriginalValues() {
		NapierUserModelImpl napierUserModelImpl = this;

		napierUserModelImpl._originalUuid = napierUserModelImpl._uuid;

		napierUserModelImpl._originalLiferayUserId = napierUserModelImpl._liferayUserId;

		napierUserModelImpl._originalMrNumber = napierUserModelImpl._mrNumber;

		napierUserModelImpl._originalTpaId = napierUserModelImpl._tpaId;

		napierUserModelImpl._originalPatientId = napierUserModelImpl._patientId;

		napierUserModelImpl._originalUsername = napierUserModelImpl._username;

		napierUserModelImpl._originalPassword = napierUserModelImpl._password;

		napierUserModelImpl._columnBitmask = 0;
	}

	@Override
	public CacheModel<NapierUser> toCacheModel() {
		NapierUserCacheModel napierUserCacheModel = new NapierUserCacheModel();

		napierUserCacheModel.uuid = getUuid();

		String uuid = napierUserCacheModel.uuid;

		if ((uuid != null) && (uuid.length() == 0)) {
			napierUserCacheModel.uuid = null;
		}

		napierUserCacheModel.id = getId();

		napierUserCacheModel.liferayUserId = getLiferayUserId();

		String liferayUserId = napierUserCacheModel.liferayUserId;

		if ((liferayUserId != null) && (liferayUserId.length() == 0)) {
			napierUserCacheModel.liferayUserId = null;
		}

		napierUserCacheModel.userType = getUserType();

		String userType = napierUserCacheModel.userType;

		if ((userType != null) && (userType.length() == 0)) {
			napierUserCacheModel.userType = null;
		}

		napierUserCacheModel.mrNumber = getMrNumber();

		String mrNumber = napierUserCacheModel.mrNumber;

		if ((mrNumber != null) && (mrNumber.length() == 0)) {
			napierUserCacheModel.mrNumber = null;
		}

		napierUserCacheModel.tpaId = getTpaId();

		String tpaId = napierUserCacheModel.tpaId;

		if ((tpaId != null) && (tpaId.length() == 0)) {
			napierUserCacheModel.tpaId = null;
		}

		napierUserCacheModel.coroporateId = getCoroporateId();

		String coroporateId = napierUserCacheModel.coroporateId;

		if ((coroporateId != null) && (coroporateId.length() == 0)) {
			napierUserCacheModel.coroporateId = null;
		}

		napierUserCacheModel.patientId = getPatientId();

		String patientId = napierUserCacheModel.patientId;

		if ((patientId != null) && (patientId.length() == 0)) {
			napierUserCacheModel.patientId = null;
		}

		napierUserCacheModel.age = getAge();

		napierUserCacheModel.mobile = getMobile();

		String mobile = napierUserCacheModel.mobile;

		if ((mobile != null) && (mobile.length() == 0)) {
			napierUserCacheModel.mobile = null;
		}

		napierUserCacheModel.gender = getGender();

		String gender = napierUserCacheModel.gender;

		if ((gender != null) && (gender.length() == 0)) {
			napierUserCacheModel.gender = null;
		}

		napierUserCacheModel.address = getAddress();

		String address = napierUserCacheModel.address;

		if ((address != null) && (address.length() == 0)) {
			napierUserCacheModel.address = null;
		}

		napierUserCacheModel.specialization = getSpecialization();

		String specialization = napierUserCacheModel.specialization;

		if ((specialization != null) && (specialization.length() == 0)) {
			napierUserCacheModel.specialization = null;
		}

		napierUserCacheModel.firstname = getFirstname();

		String firstname = napierUserCacheModel.firstname;

		if ((firstname != null) && (firstname.length() == 0)) {
			napierUserCacheModel.firstname = null;
		}

		napierUserCacheModel.lastname = getLastname();

		String lastname = napierUserCacheModel.lastname;

		if ((lastname != null) && (lastname.length() == 0)) {
			napierUserCacheModel.lastname = null;
		}

		napierUserCacheModel.username = getUsername();

		String username = napierUserCacheModel.username;

		if ((username != null) && (username.length() == 0)) {
			napierUserCacheModel.username = null;
		}

		napierUserCacheModel.password = getPassword();

		String password = napierUserCacheModel.password;

		if ((password != null) && (password.length() == 0)) {
			napierUserCacheModel.password = null;
		}

		napierUserCacheModel.email = getEmail();

		String email = napierUserCacheModel.email;

		if ((email != null) && (email.length() == 0)) {
			napierUserCacheModel.email = null;
		}

		return napierUserCacheModel;
	}

	@Override
	public String toString() {
		StringBundler sb = new StringBundler(37);

		sb.append("{uuid=");
		sb.append(getUuid());
		sb.append(", id=");
		sb.append(getId());
		sb.append(", liferayUserId=");
		sb.append(getLiferayUserId());
		sb.append(", userType=");
		sb.append(getUserType());
		sb.append(", mrNumber=");
		sb.append(getMrNumber());
		sb.append(", tpaId=");
		sb.append(getTpaId());
		sb.append(", coroporateId=");
		sb.append(getCoroporateId());
		sb.append(", patientId=");
		sb.append(getPatientId());
		sb.append(", age=");
		sb.append(getAge());
		sb.append(", mobile=");
		sb.append(getMobile());
		sb.append(", gender=");
		sb.append(getGender());
		sb.append(", address=");
		sb.append(getAddress());
		sb.append(", specialization=");
		sb.append(getSpecialization());
		sb.append(", firstname=");
		sb.append(getFirstname());
		sb.append(", lastname=");
		sb.append(getLastname());
		sb.append(", username=");
		sb.append(getUsername());
		sb.append(", password=");
		sb.append(getPassword());
		sb.append(", email=");
		sb.append(getEmail());
		sb.append("}");

		return sb.toString();
	}

	@Override
	public String toXmlString() {
		StringBundler sb = new StringBundler(58);

		sb.append("<model><model-name>");
		sb.append("com.innominds.portlets.service.model.NapierUser");
		sb.append("</model-name>");

		sb.append(
			"<column><column-name>uuid</column-name><column-value><![CDATA[");
		sb.append(getUuid());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>id</column-name><column-value><![CDATA[");
		sb.append(getId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>liferayUserId</column-name><column-value><![CDATA[");
		sb.append(getLiferayUserId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>userType</column-name><column-value><![CDATA[");
		sb.append(getUserType());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>mrNumber</column-name><column-value><![CDATA[");
		sb.append(getMrNumber());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>tpaId</column-name><column-value><![CDATA[");
		sb.append(getTpaId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>coroporateId</column-name><column-value><![CDATA[");
		sb.append(getCoroporateId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>patientId</column-name><column-value><![CDATA[");
		sb.append(getPatientId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>age</column-name><column-value><![CDATA[");
		sb.append(getAge());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>mobile</column-name><column-value><![CDATA[");
		sb.append(getMobile());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>gender</column-name><column-value><![CDATA[");
		sb.append(getGender());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>address</column-name><column-value><![CDATA[");
		sb.append(getAddress());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>specialization</column-name><column-value><![CDATA[");
		sb.append(getSpecialization());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>firstname</column-name><column-value><![CDATA[");
		sb.append(getFirstname());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>lastname</column-name><column-value><![CDATA[");
		sb.append(getLastname());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>username</column-name><column-value><![CDATA[");
		sb.append(getUsername());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>password</column-name><column-value><![CDATA[");
		sb.append(getPassword());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>email</column-name><column-value><![CDATA[");
		sb.append(getEmail());
		sb.append("]]></column-value></column>");

		sb.append("</model>");

		return sb.toString();
	}

	private static ClassLoader _classLoader = NapierUser.class.getClassLoader();
	private static Class<?>[] _escapedModelInterfaces = new Class[] {
			NapierUser.class
		};
	private String _uuid;
	private String _originalUuid;
	private long _id;
	private String _liferayUserId;
	private String _originalLiferayUserId;
	private String _userType;
	private String _mrNumber;
	private String _originalMrNumber;
	private String _tpaId;
	private String _originalTpaId;
	private String _coroporateId;
	private String _patientId;
	private String _originalPatientId;
	private int _age;
	private String _mobile;
	private String _gender;
	private String _address;
	private String _specialization;
	private String _firstname;
	private String _lastname;
	private String _username;
	private String _originalUsername;
	private String _password;
	private String _originalPassword;
	private String _email;
	private long _columnBitmask;
	private NapierUser _escapedModel;
}